3.297 \(\int \frac {(a+b \sin (c+\frac {d}{x}))^2}{(e+f x)^2} \, dx\)

Optimal. Leaf size=195 \[ \frac {a^2}{e \left (\frac {e}{x}+f\right )}-\frac {2 a b d \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {2 a b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {2 a b \sin \left (c+\frac {d}{x}\right )}{e \left (\frac {e}{x}+f\right )}-\frac {b^2 d \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Ci}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}-\frac {b^2 d \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {b^2 \sin ^2\left (c+\frac {d}{x}\right )}{e \left (\frac {e}{x}+f\right )} \]

[Out]

a^2/e/(f+e/x)-2*a*b*d*Ci(d*(f/e+1/x))*cos(c-d*f/e)/e^2-b^2*d*cos(2*c-2*d*f/e)*Si(2*d*(f/e+1/x))/e^2-b^2*d*Ci(2
*d*(f/e+1/x))*sin(2*c-2*d*f/e)/e^2+2*a*b*d*Si(d*(f/e+1/x))*sin(c-d*f/e)/e^2+2*a*b*sin(c+d/x)/e/(f+e/x)+b^2*sin
(c+d/x)^2/e/(f+e/x)

________________________________________________________________________________________

Rubi [A]  time = 0.39, antiderivative size = 195, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 8, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {3431, 3317, 3297, 3303, 3299, 3302, 3313, 12} \[ \frac {a^2}{e \left (\frac {e}{x}+f\right )}-\frac {2 a b d \cos \left (c-\frac {d f}{e}\right ) \text {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {2 a b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {2 a b \sin \left (c+\frac {d}{x}\right )}{e \left (\frac {e}{x}+f\right )}-\frac {b^2 d \sin \left (2 c-\frac {2 d f}{e}\right ) \text {CosIntegral}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}-\frac {b^2 d \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^2}+\frac {b^2 \sin ^2\left (c+\frac {d}{x}\right )}{e \left (\frac {e}{x}+f\right )} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[c + d/x])^2/(e + f*x)^2,x]

[Out]

a^2/(e*(f + e/x)) - (2*a*b*d*Cos[c - (d*f)/e]*CosIntegral[d*(f/e + x^(-1))])/e^2 - (b^2*d*CosIntegral[2*d*(f/e
 + x^(-1))]*Sin[2*c - (2*d*f)/e])/e^2 + (2*a*b*Sin[c + d/x])/(e*(f + e/x)) + (b^2*Sin[c + d/x]^2)/(e*(f + e/x)
) + (2*a*b*d*Sin[c - (d*f)/e]*SinIntegral[d*(f/e + x^(-1))])/e^2 - (b^2*d*Cos[2*c - (2*d*f)/e]*SinIntegral[2*d
*(f/e + x^(-1))])/e^2

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3313

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x]^
n)/(d*(m + 1)), x] - Dist[(f*n)/(d*(m + 1)), Int[ExpandTrigReduce[(c + d*x)^(m + 1), Cos[e + f*x]*Sin[e + f*x]
^(n - 1), x], x], x] /; FreeQ[{c, d, e, f, m}, x] && IGtQ[n, 1] && GeQ[m, -2] && LtQ[m, -1]

Rule 3317

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rule 3431

Int[((g_.) + (h_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)])^(p_.), x_Symbol] :
> Dist[1/(n*f), Subst[Int[ExpandIntegrand[(a + b*Sin[c + d*x])^p, x^(1/n - 1)*(g - (e*h)/f + (h*x^(1/n))/f)^m,
 x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p, 0] && IntegerQ[1/n]

Rubi steps

\begin {align*} \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{(e+f x)^2} \, dx &=-\operatorname {Subst}\left (\int \frac {(a+b \sin (c+d x))^2}{(f+e x)^2} \, dx,x,\frac {1}{x}\right )\\ &=-\operatorname {Subst}\left (\int \left (\frac {a^2}{(f+e x)^2}+\frac {2 a b \sin (c+d x)}{(f+e x)^2}+\frac {b^2 \sin ^2(c+d x)}{(f+e x)^2}\right ) \, dx,x,\frac {1}{x}\right )\\ &=\frac {a^2}{e \left (f+\frac {e}{x}\right )}-(2 a b) \operatorname {Subst}\left (\int \frac {\sin (c+d x)}{(f+e x)^2} \, dx,x,\frac {1}{x}\right )-b^2 \operatorname {Subst}\left (\int \frac {\sin ^2(c+d x)}{(f+e x)^2} \, dx,x,\frac {1}{x}\right )\\ &=\frac {a^2}{e \left (f+\frac {e}{x}\right )}+\frac {2 a b \sin \left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}+\frac {b^2 \sin ^2\left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}-\frac {(2 a b d) \operatorname {Subst}\left (\int \frac {\cos (c+d x)}{f+e x} \, dx,x,\frac {1}{x}\right )}{e}-\frac {\left (2 b^2 d\right ) \operatorname {Subst}\left (\int \frac {\sin (2 c+2 d x)}{2 (f+e x)} \, dx,x,\frac {1}{x}\right )}{e}\\ &=\frac {a^2}{e \left (f+\frac {e}{x}\right )}+\frac {2 a b \sin \left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}+\frac {b^2 \sin ^2\left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}-\frac {\left (b^2 d\right ) \operatorname {Subst}\left (\int \frac {\sin (2 c+2 d x)}{f+e x} \, dx,x,\frac {1}{x}\right )}{e}-\frac {\left (2 a b d \cos \left (c-\frac {d f}{e}\right )\right ) \operatorname {Subst}\left (\int \frac {\cos \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{e}+\frac {\left (2 a b d \sin \left (c-\frac {d f}{e}\right )\right ) \operatorname {Subst}\left (\int \frac {\sin \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{e}\\ &=\frac {a^2}{e \left (f+\frac {e}{x}\right )}-\frac {2 a b d \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^2}+\frac {2 a b \sin \left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}+\frac {b^2 \sin ^2\left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}+\frac {2 a b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^2}-\frac {\left (b^2 d \cos \left (2 c-\frac {2 d f}{e}\right )\right ) \operatorname {Subst}\left (\int \frac {\sin \left (\frac {2 d f}{e}+2 d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{e}-\frac {\left (b^2 d \sin \left (2 c-\frac {2 d f}{e}\right )\right ) \operatorname {Subst}\left (\int \frac {\cos \left (\frac {2 d f}{e}+2 d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{e}\\ &=\frac {a^2}{e \left (f+\frac {e}{x}\right )}-\frac {2 a b d \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^2}-\frac {b^2 d \text {Ci}\left (\frac {2 d \left (f+\frac {e}{x}\right )}{e}\right ) \sin \left (2 c-\frac {2 d f}{e}\right )}{e^2}+\frac {2 a b \sin \left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}+\frac {b^2 \sin ^2\left (c+\frac {d}{x}\right )}{e \left (f+\frac {e}{x}\right )}+\frac {2 a b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^2}-\frac {b^2 d \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (\frac {2 d \left (f+\frac {e}{x}\right )}{e}\right )}{e^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.49, size = 263, normalized size = 1.35 \[ -\frac {2 a^2 e^2+4 a b d f (e+f x) \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )-4 a b d f^2 x \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )-4 a b d e f \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )-4 a b e f x \sin \left (c+\frac {d}{x}\right )+2 b^2 d f (e+f x) \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Ci}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+2 b^2 d f^2 x \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+2 b^2 d e f \cos \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+b^2 e f x \cos \left (2 \left (c+\frac {d}{x}\right )\right )+b^2 e^2}{2 e^2 f (e+f x)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sin[c + d/x])^2/(e + f*x)^2,x]

[Out]

-1/2*(2*a^2*e^2 + b^2*e^2 + b^2*e*f*x*Cos[2*(c + d/x)] + 4*a*b*d*f*(e + f*x)*Cos[c - (d*f)/e]*CosIntegral[d*(f
/e + x^(-1))] + 2*b^2*d*f*(e + f*x)*CosIntegral[2*d*(f/e + x^(-1))]*Sin[2*c - (2*d*f)/e] - 4*a*b*e*f*x*Sin[c +
 d/x] - 4*a*b*d*e*f*Sin[c - (d*f)/e]*SinIntegral[d*(f/e + x^(-1))] - 4*a*b*d*f^2*x*Sin[c - (d*f)/e]*SinIntegra
l[d*(f/e + x^(-1))] + 2*b^2*d*e*f*Cos[2*c - (2*d*f)/e]*SinIntegral[2*d*(f/e + x^(-1))] + 2*b^2*d*f^2*x*Cos[2*c
 - (2*d*f)/e]*SinIntegral[2*d*(f/e + x^(-1))])/(e^2*f*(e + f*x))

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 343, normalized size = 1.76 \[ -\frac {2 \, b^{2} e f x \cos \left (\frac {c x + d}{x}\right )^{2} - 4 \, a b e f x \sin \left (\frac {c x + d}{x}\right ) - b^{2} e f x + {\left (2 \, a^{2} + b^{2}\right )} e^{2} + 2 \, {\left (b^{2} d f^{2} x + b^{2} d e f\right )} \cos \left (-\frac {2 \, {\left (c e - d f\right )}}{e}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right ) + 4 \, {\left (a b d f^{2} x + a b d e f\right )} \sin \left (-\frac {c e - d f}{e}\right ) \operatorname {Si}\left (\frac {d f x + d e}{e x}\right ) + 2 \, {\left ({\left (a b d f^{2} x + a b d e f\right )} \operatorname {Ci}\left (\frac {d f x + d e}{e x}\right ) + {\left (a b d f^{2} x + a b d e f\right )} \operatorname {Ci}\left (-\frac {d f x + d e}{e x}\right )\right )} \cos \left (-\frac {c e - d f}{e}\right ) - {\left ({\left (b^{2} d f^{2} x + b^{2} d e f\right )} \operatorname {Ci}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right ) + {\left (b^{2} d f^{2} x + b^{2} d e f\right )} \operatorname {Ci}\left (-\frac {2 \, {\left (d f x + d e\right )}}{e x}\right )\right )} \sin \left (-\frac {2 \, {\left (c e - d f\right )}}{e}\right )}{2 \, {\left (e^{2} f^{2} x + e^{3} f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))^2/(f*x+e)^2,x, algorithm="fricas")

[Out]

-1/2*(2*b^2*e*f*x*cos((c*x + d)/x)^2 - 4*a*b*e*f*x*sin((c*x + d)/x) - b^2*e*f*x + (2*a^2 + b^2)*e^2 + 2*(b^2*d
*f^2*x + b^2*d*e*f)*cos(-2*(c*e - d*f)/e)*sin_integral(2*(d*f*x + d*e)/(e*x)) + 4*(a*b*d*f^2*x + a*b*d*e*f)*si
n(-(c*e - d*f)/e)*sin_integral((d*f*x + d*e)/(e*x)) + 2*((a*b*d*f^2*x + a*b*d*e*f)*cos_integral((d*f*x + d*e)/
(e*x)) + (a*b*d*f^2*x + a*b*d*e*f)*cos_integral(-(d*f*x + d*e)/(e*x)))*cos(-(c*e - d*f)/e) - ((b^2*d*f^2*x + b
^2*d*e*f)*cos_integral(2*(d*f*x + d*e)/(e*x)) + (b^2*d*f^2*x + b^2*d*e*f)*cos_integral(-2*(d*f*x + d*e)/(e*x))
)*sin(-2*(c*e - d*f)/e))/(e^2*f^2*x + e^3*f)

________________________________________________________________________________________

giac [B]  time = 0.47, size = 700, normalized size = 3.59 \[ -\frac {4 \, a b d^{3} f \cos \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Ci}\left ({\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) - 4 \, a b c d^{2} \cos \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Ci}\left ({\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) e + 2 \, b^{2} d^{3} f \operatorname {Ci}\left (2 \, {\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) \sin \left (-2 \, {\left (d f - c e\right )} e^{\left (-1\right )}\right ) - 2 \, b^{2} c d^{2} \operatorname {Ci}\left (2 \, {\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) e \sin \left (-2 \, {\left (d f - c e\right )} e^{\left (-1\right )}\right ) + 4 \, a b d^{3} f \sin \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Si}\left (-{\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) - 4 \, a b c d^{2} e \sin \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Si}\left (-{\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) - 2 \, b^{2} d^{3} f \cos \left (-2 \, {\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Si}\left (-2 \, {\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) + 2 \, b^{2} c d^{2} \cos \left (-2 \, {\left (d f - c e\right )} e^{\left (-1\right )}\right ) e \operatorname {Si}\left (-2 \, {\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) + \frac {4 \, {\left (c x + d\right )} a b d^{2} \cos \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Ci}\left ({\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) e}{x} + \frac {2 \, {\left (c x + d\right )} b^{2} d^{2} \operatorname {Ci}\left (2 \, {\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) e \sin \left (-2 \, {\left (d f - c e\right )} e^{\left (-1\right )}\right )}{x} + \frac {4 \, {\left (c x + d\right )} a b d^{2} e \sin \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Si}\left (-{\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right )}{x} - \frac {2 \, {\left (c x + d\right )} b^{2} d^{2} \cos \left (-2 \, {\left (d f - c e\right )} e^{\left (-1\right )}\right ) e \operatorname {Si}\left (-2 \, {\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right )}{x} + b^{2} d^{2} \cos \left (\frac {2 \, {\left (c x + d\right )}}{x}\right ) e - 4 \, a b d^{2} e \sin \left (\frac {c x + d}{x}\right ) - 2 \, a^{2} d^{2} e - b^{2} d^{2} e}{2 \, {\left (d f e^{2} - c e^{3} + \frac {{\left (c x + d\right )} e^{3}}{x}\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))^2/(f*x+e)^2,x, algorithm="giac")

[Out]

-1/2*(4*a*b*d^3*f*cos(-(d*f - c*e)*e^(-1))*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1)) - 4*a*b*c*d^2*cos(
-(d*f - c*e)*e^(-1))*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e + 2*b^2*d^3*f*cos_integral(2*(d*f - c*
e + (c*x + d)*e/x)*e^(-1))*sin(-2*(d*f - c*e)*e^(-1)) - 2*b^2*c*d^2*cos_integral(2*(d*f - c*e + (c*x + d)*e/x)
*e^(-1))*e*sin(-2*(d*f - c*e)*e^(-1)) + 4*a*b*d^3*f*sin(-(d*f - c*e)*e^(-1))*sin_integral(-(d*f - c*e + (c*x +
 d)*e/x)*e^(-1)) - 4*a*b*c*d^2*e*sin(-(d*f - c*e)*e^(-1))*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1)) -
2*b^2*d^3*f*cos(-2*(d*f - c*e)*e^(-1))*sin_integral(-2*(d*f - c*e + (c*x + d)*e/x)*e^(-1)) + 2*b^2*c*d^2*cos(-
2*(d*f - c*e)*e^(-1))*e*sin_integral(-2*(d*f - c*e + (c*x + d)*e/x)*e^(-1)) + 4*(c*x + d)*a*b*d^2*cos(-(d*f -
c*e)*e^(-1))*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e/x + 2*(c*x + d)*b^2*d^2*cos_integral(2*(d*f -
c*e + (c*x + d)*e/x)*e^(-1))*e*sin(-2*(d*f - c*e)*e^(-1))/x + 4*(c*x + d)*a*b*d^2*e*sin(-(d*f - c*e)*e^(-1))*s
in_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1))/x - 2*(c*x + d)*b^2*d^2*cos(-2*(d*f - c*e)*e^(-1))*e*sin_inte
gral(-2*(d*f - c*e + (c*x + d)*e/x)*e^(-1))/x + b^2*d^2*cos(2*(c*x + d)/x)*e - 4*a*b*d^2*e*sin((c*x + d)/x) -
2*a^2*d^2*e - b^2*d^2*e)/((d*f*e^2 - c*e^3 + (c*x + d)*e^3/x)*d)

________________________________________________________________________________________

maple [A]  time = 0.09, size = 308, normalized size = 1.58 \[ -d \left (-\frac {a^{2}}{\left (e \left (c +\frac {d}{x}\right )-c e +d f \right ) e}+2 a b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{\left (e \left (c +\frac {d}{x}\right )-c e +d f \right ) e}+\frac {\frac {\Si \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}+\frac {\Ci \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}}{e}\right )-\frac {b^{2}}{2 \left (e \left (c +\frac {d}{x}\right )-c e +d f \right ) e}-\frac {b^{2} \left (-\frac {2 \cos \left (\frac {2 d}{x}+2 c \right )}{\left (e \left (c +\frac {d}{x}\right )-c e +d f \right ) e}-\frac {2 \left (\frac {2 \Si \left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \cos \left (\frac {-2 c e +2 d f}{e}\right )}{e}-\frac {2 \Ci \left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \sin \left (\frac {-2 c e +2 d f}{e}\right )}{e}\right )}{e}\right )}{4}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(c+d/x))^2/(f*x+e)^2,x)

[Out]

-d*(-a^2/(e*(c+d/x)-c*e+d*f)/e+2*a*b*(-sin(c+d/x)/(e*(c+d/x)-c*e+d*f)/e+(Si(d/x+c+(-c*e+d*f)/e)*sin((-c*e+d*f)
/e)/e+Ci(d/x+c+(-c*e+d*f)/e)*cos((-c*e+d*f)/e)/e)/e)-1/2*b^2/(e*(c+d/x)-c*e+d*f)/e-1/4*b^2*(-2*cos(2*d/x+2*c)/
(e*(c+d/x)-c*e+d*f)/e-2*(2*Si(2*d/x+2*c+2*(-c*e+d*f)/e)*cos(2*(-c*e+d*f)/e)/e-2*Ci(2*d/x+2*c+2*(-c*e+d*f)/e)*s
in(2*(-c*e+d*f)/e)/e)/e))

________________________________________________________________________________________

maxima [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))^2/(f*x+e)^2,x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (a+b\,\sin \left (c+\frac {d}{x}\right )\right )}^2}{{\left (e+f\,x\right )}^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(c + d/x))^2/(e + f*x)^2,x)

[Out]

int((a + b*sin(c + d/x))^2/(e + f*x)^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \sin {\left (c + \frac {d}{x} \right )}\right )^{2}}{\left (e + f x\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))**2/(f*x+e)**2,x)

[Out]

Integral((a + b*sin(c + d/x))**2/(e + f*x)**2, x)

________________________________________________________________________________________